/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package homework6;

/**
 *
 * @author Administrator
 */
import java.util.*;

public class MainB {

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String c = sc.next();
        int sum = 0;
        char a[] = new char[c.length()];
        for (int i = 0; i < c.length(); i++) {
            a[i] = c.charAt(i);
            if (a[i] >= '0' && a[i] <= '9') {
                int p = a[i] - '0';
                sum = sum + p;
            }
        }
        System.out.println(sum);
    }
}
